0.4. Providers
Which model path should you choose?
Use the path that matches the lesson and your constraints:
| Path | Model | Authentication | Where it appears |
|---|---|---|---|
| Local | qwen3:4b in Ollama |
Non-secret client marker | Required path from Chapter 2 onward. |
| Native ADK | Explicit Gemini model | Gemini key or Application Default Credentials | Optional provider comparison. |
| GKE | gemini-3.5-flash on Vertex AI |
Workload Identity Federation | Optional Chapter 6 lab. |
Qwen3 is the default: no account, no mandatory SaaS, and no usage fee. Chapters 2-4 use Ollama directly through its OpenAI-compatible endpoint. Chapter 5 changes only the endpoint to agentgateway. Native Gemini remains useful for learning ADK's direct provider integration, but it is not on the required path.
Is Qwen3 really open source?
The course pulls the qwen3:4b model with Ollama. Its published weights are Apache-2.0 licensed. That is materially different from calling a proprietary hosted model and describing only the client SDK as open source.
Local inference still has constraints: the model download is several gigabytes, CPU inference can be slow, and output quality depends on available memory and hardware. The qwen3:4b Ollama tag can move, so record the installed model ID from ollama list with evaluation results. The deterministic test suite does not require it.
What does the repository default to?
The typed settings default to:
AGENT_MODEL_PROVIDER=openai-compatible
AGENT_MODEL=qwen3:4b
OPENAI_BASE_URL=http://127.0.0.1:11434/v1
OPENAI_API_KEY=local-ollama
local-ollama is a non-secret marker required by the OpenAI client. Direct Ollama does not authenticate it. No network call happens during imports or offline tests.
Chapter 5 keeps the provider and model values and changes the endpoint:
AGENT_MODEL_PROVIDER=openai-compatible
AGENT_MODEL=qwen3:4b
OPENAI_BASE_URL=http://127.0.0.1:4000/v1
OPENAI_API_KEY=local-ollama
agentgateway then owns the upstream Ollama route and data-plane policy without forcing an application provider switch.
How do you authenticate to native Gemini?
For the direct Gemini API, place a Gemini API key in the gitignored repository-root .env:
For Vertex AI on a workstation, authenticate with Application Default Credentials and select the enterprise API explicitly:
gcloud auth application-default login
AGENT_MODEL_PROVIDER=gemini
AGENT_MODEL=gemini-3.5-flash
GOOGLE_GENAI_USE_ENTERPRISE=true
GOOGLE_CLOUD_PROJECT=agentops-open-course
GOOGLE_CLOUD_LOCATION=global
mise run config:check rejects a missing Gemini auth path, an API key mixed with the course's enterprise/ADC mode, or enterprise mode without project and location. mise run doctor:gcp then verifies the external ADC credential before the optional cloud path. For GKE, do not inject a long-lived key: the provided infrastructure maps the Kubernetes service account to Google IAM with Workload Identity Federation.
Never infer authentication from a key prefix
Key products and formats change. Follow the current provider documentation, configure the matching endpoint explicitly, and keep credentials out of Git, images, manifests, traces, and shell history.
Does the course use LiteLLM?
No. The default agent uses ADK's OpenAILlm adapter for direct Ollama and agentgateway. The optional Gemini branch uses ADK's native Gemini model. Provider routing, identity, limits, and traffic policy belong at agentgateway. No runtime or evaluation path depends on LiteLLM.
Are model-backed runs free or offline?
Local Ollama inference avoids a provider account and usage fee, but it is not "offline" until the model and dependencies have been downloaded. Gemini and Vertex can incur usage charges and send prompts to a third party. The course's unit tests, data checks, formatting, typing, vulnerability audit, and deterministic adversarial regressions run without a model.
What is the provider checkpoint?
For the account-free path, install Ollama, then run:
Continue when the staged doctor confirms that Ollama is reachable and qwen3:4b is installed. You do not need to start the gateway until Chapter 5.